package com.chinasoft.ssm.mapper;

import com.chinasoft.ssm.pojo.Admin;
import com.chinasoft.ssm.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface AdminInfoMapper {

    @Select("select * from admin where name = #{name}")
    Admin selectByName(String name);
    @Select("select * from admin")
    List<Admin> selectall();
    @Select("select  * from admin where id=#{id}")
     Admin selectById(int id);
    @Update("update admin set name = #{name} , sex = #{sex}" +
            "" +
            ", password = #{password}, phone = #{phone} where id = #{id} ")
    Integer update(Admin admin);
}
